<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="/aaayjcsxdl/syntaxhighlighter_3.0.83/scripts/shCore.js"></script>
<script type="text/javascript" src="/aaayjcsxdl/syntaxhighlighter_3.0.83/scripts/shBrushJScript.js"></script>
<script type="text/javascript" src="/aaayjcsxdl/syntaxhighlighter_3.0.83/scripts/shBrushJava.js"></script>
<script type="text/javascript" src="/aaayjcsxdl/jquery.form.js"></script>
<link href="/aaayjcsxdl/syntaxhighlighter_3.0.83/styles/shCore.css" rel="stylesheet" type="text/css" />
<link href="/aaayjcsxdl/syntaxhighlighter_3.0.83/styles/shThemeDefault.css" rel="stylesheet" type="text/css" />


<script type="text/javascript">
$(document).ready(function(){
	$('span').eq(0).html($('p').eq(1).width());
	$('span').eq(1).html($('p').eq(1).height());
	$('span').eq(2).html($('p').eq(1).offset().left);
	$('span').eq(3).html($('p').eq(1).offset().top);
	
	$(this).mousedown(function(event){
		$('span').eq(4).html(event.pageX + "," + event.pageY);
		
		inrect.call($('#ttt'),event.pageX,event.pageY);
		});
	
	var inrect = function(x,y){
		var p = $(this).offset();
		if(x<p.left || y<p.top || x > p.left + $(this).width() || y > p.top + $(this).height()){
			$('#ttt').text('out');
		}else{
			$('#ttt').text('in');
		}
	};
	
	SyntaxHighlighter.all();
});

</script>
<style type="text/css">
#ttt{
width: 50px;
height: 50px;
border: 1px solid red;
margin: 30px auto;
display: none;
}

</style>
</head>
<body>
width:<span></span>,height:<span></span><br/>
left:<span></span>,top:<span></span><br/>

mousedown:<span></span>
<div><p>abc</p></div>

<script type="text/javascript">
$(document).ready(function(){
$.ajax({
	url: "/pagehit",
	dataType: "jsonp",
	data: {obname:'article',obid:14751,siteid:9568},
	success: function( hitnum ) {
		$('#ttt').text(hitnum);
	}
});
});

$(document).ready(function(){
	$.ajax({
		url: "/jsonp",
		dataType: "html",
		data: {type:'html',tpl:'votefragment'},
		success: function( html ) {
			$('#formcontainer').html(html);
			$('#voteForm').submit(function(){
				if($('input[name="_relationModelId"]:checked').length == 1){
					 $(this).ajaxSubmit({type:"GET",dataType:"json",success:function(responseText, statusText, xhr, $form){
						 var votedata = responseText.response.data[0];
						 var voteresult =$('#vote-result'); 
						 voteresult.text("您的投票已生效，谢谢！");
						 voteresult.slideUp(3000);
						 var vid = $('input[name="current-vote-id"]').val();
						 $.ajax({
							 url:"/jsonp",
							 dataType:'html',
							 data:{type:'html',tpl:'voteresult'},
							 success:function(jdata){
								 $('#vote-display').html(jdata);
							 }
							});
					 }}); 
				}
				return false;
			});
		}
	});
	});
/*
_modelName	com.m3958.firstgwt.server.model.Article
_operationType	fetch
_subOperationType	FETCH_ONE
id	18118
*/
</script>
<div><p>def</p></div>
<div id="ttt"></div>
<div id = "vote-result"></div>
<div id = "vote-display"></div>
<div id="formcontainer"></div>
<p>a</p>
<p>a</p>
<p>a</p>
<p>a</p>
<p>a</p>
<p>a</p>
<p>a</p>
<p>a</p>
<p>a</p>
<p>a</p>
<p>a</p>
<p>a</p>
<p>a</p>
<p>a</p>
<p>a</p>
<p>a</p>
<p>a</p>
<p>a</p>
<p>a</p>
<p>a</p>
<p>a</p>
<p>a</p>
<p>a</p>
<p>a</p>
<p>a</p>
<p>a</p>
<p>a</p>
<p>a</p>
<p>a</p>
<p>a</p>
<p>a</p>
<p>a</p>
<p>a</p>
<p>a</p>
<p>a</p>
<p>a</p>
<p>a</p>
<p>a</p>
<p>a</p>
<p>a</p>

<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
</body>
</html>
<!-- 
Here is an example of finding the position within the particular element rather than the page:

   $("#special").click(function(e){

	var x = e.pageX - this.offsetLeft;
	var y = e.pageY - this.offsetTop;

      $('#status2').html(x +', '+ y);
   });
-->